package Thread;

public class Dom6 {
    public static void main(String[] args) {
        Thread t1=new Thread(()->{
           while (true){
               System.out.println("hello thread1");
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
        },"T1");
        t1.start();
        Thread t2=new Thread(()->{
            while (true){
                System.out.println("hello thread2");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"T2");
        t2.start();
        Thread t3=new Thread(()->{
            while (true){
                System.out.println("hello thread3");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"T3");
        t3.start();
    }
}
